{% extends 'TopxiaAdminBundle::layout.html.twig' %}

{% set script_controller = 'teacher/promote-list' %}

{% set menu = 'admin_teacher_promote' %}

{% block main %}

  <form id="user-search-form" class="form-inline well well-sm" action="" method="get" novalidate>
    {% include 'OrgBundle:Org:org-tree-select.html.twig' with {orgCode: app.request.get('orgCode'), modal: 'list'} %}
    
    <div class="form-group">
      <input type="text" name="nickname" class="form-control" value="{{ app.request.query.get('nickname') }}"
             placeholder="用户名">
    </div>

    <button class="btn btn-primary">搜索</button>

  </form>

  <table class="table table-striped table-hover mtl" id="teacher-promote-table">
    <thead>
    <tr>
      <th>顺序号</th>
      <th width="35%">用户名</th>
      {% include 'OrgBundle:Org/Parts:table-thead-tr.html.twig' %}
      <th>推荐时间</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {% for user in users %}
      {% include 'TopxiaAdminBundle:Teacher:teacher-promote-tr.html.twig' %}
    {% else %}
      <tr>
        <td colspan="20">
          <div class="empty">暂无推荐老师</div>
        </td>
      </tr>
    {% endfor %}
    </tbody>
  </table>

  {{ web_macro.paginator(paginator) }}

{% endblock %}